/*
Copyright SecureKey Technologies Inc. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/

package resource

import (
	common "git.cloud.inspur.com/ichain/ichain-protos-go/common"
	pb "git.cloud.inspur.com/ichain/ichain-protos-go/inode"
	"git.cloud.inspur.com/ichain/ichain-sdk-go/pkg/providers/ichain"
)

// CreateChainRequest 所有请求的信息
type CreateChainRequest struct {
	Name       string
	Consenser  ichain.Consenser
	Envelope   []byte
	Config     []byte
	Signatures []*common.ConfigSignature
}

// InstallContractRequest 安装合约请求
type InstallContractRequest struct {
	Name    string
	Path    string
	Version string
	Package *CCPackage
}

// JoinChainRequest 加入链请求
type JoinChainRequest struct {
	Name         string
	GenesisBlock *common.Block
}

// CCPackage 合约打包
type CCPackage struct {
	Type pb.ContractSpec_Type
	Code []byte
}
